Developer --> Technical Publications
PATHMac OS 8 Developer Documentation > Networking and Communications > AppleShare >

User Authentication Modules


UAMArgs Structure

The UAMArgs structure is the only parameter to the UAMCall function. The fields of the UAMArgs structure define the command type and provide all of the information necessary for UAMCall to complete the command successfully.

struct UAMArgs {
    short command;
    short sessionRefNum;
    long result;
    void *uamInfo;
    long uamInfoSize;
    ClientUAMCallbackRec *callbacks;
    union {
        struct UAMChgPassBlk chgPass;
        struct UAMVSDlogBlk vsDlog;
        struct UAMAuthBlk auth;
        struct UAMPWDlogBlk pwDlg;
        struct UAMOpenBlk open;
    };
};
command
On input, the UAM command code, which must be one of the following values:
enum { kUAMOpen = 0, kUAMPWDlog, kUAMLogin, kUAMVSDlog, kUAMChgPassDlg, kUAMChgPass, kUAMGetInfoSize, kUAMGetInfo, kUAMClose, kUAMPrOpen, kUAMPrAuthDlog, kUAMPrAuth };
sessionRefNum
An AFP session reference number. If an AFP session is not already in progress, an AFP session reference number is returned by the client UAM during the UAMLogin call. If an AFP session is in progress, the AFP session reference number is passed during the UAMOpen call and all subsequent calls for a particular session.
result
On output, an OSStatus reflecting the result of calling UAMCall with a particular UAM command code. Typical values are noErr , userCancelledError , afpUserNotAuthErr , afpPwdTooShortErr , afpPwdExpiredErr , and afpPwdNeedsChangeErr .
uamInfo
On input, a pointer to the buffer (allocated by the AFP client in the system heap) in which the GetUAMInfo call UAMGetInfo Command is to store persistent authentication information. When logging in via the Chooser, the uamInfo field is nil until the AFP client calls UAMCall with a command of GetUAMInfo . All other UAM commands should treat this field as a read-only field. The AFP client is responsible for disposing of the buffer pointed to by uamInfo .
uamInfoSize
On input, the size in bytes of uamInfo . On output, UAMCall sets uamInfoSize to reflect the current size of uamInfo .
callbacks
On input, a pointer to the ClientUAMCallbackRec structure ClientUAMCallbackRec Structure for this session.
union
If the value of command is kUAMChgPass or kUAMChgPassDlg , on input, union is a UAMChgPassBlck structure UAMChgPassBlk Structure .
If the value of command is kUAMVSDlog , on input, union is a UAMVSDlogBlk structure UAMVSDlogBlk Structure .
If the value of command is kUAMLogin , on input. union is a UAMAuthBlk structure UAMAuthBlk Structure .
If the value of command is kUAMPWDlog , on input, union is a UAMPWDlogBlk structure UAMAuthBlk Structure .
If the value of command is kUAMOpen , on input, union is a UAMOpenBlk structure UAMOpenBlk Structure .

© 1999 Apple Computer, Inc. – (Last Updated 07 May 99)